package org.ovirt.microvirt.services.situation;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

import org.ovirt.microvirt.beans.Host;
import org.ovirt.microvirt.beans.VirtualMachine;
import org.ovirt.microvirt.beans.situation.HostStatus;

@Path("/situation/hosts/")
@Produces("application/json")
public interface HostSituationService {

	HostStatus checkHostStatus(Host host);
	
	HostStatus getHostStatus(Host host);

	@GET
	@Path("{hostName}/status")
	@Produces("application/json")
	HostStatus getHostStatusByName(@PathParam("hostName") String hostName);

	@POST
	@Path("{hostName}/power/on")
	void powerOff(@PathParam("hostName") String hostName);

	@POST
	@Path("{hostName}/power/off")
	void powerOn(@PathParam("hostName") String hostName);
	
	@GET
	@Path("{hostName}/vms")
	List<VirtualMachine> listVirtualMachines(String hostName);
	
}
